/*----------------------------------------------------------------------------
 *      RL-ARM - RTC
 *----------------------------------------------------------------------------
 *      Name:    RTX_RTC.h
 *      Purpose: Header for RTC Generic Layer Driver
 *      Rev.:    V4.70
 *----------------------------------------------------------------------------
 *      This code is part of the RealView Run-Time Library.
 *---------------------------------------------------------------------------*/

#include "RTL.h"     /* RTX kernel functions & defines      */
#include "RTC_Cfg.h" /* RTC Configuration                   */

#ifndef __RTX_RTC_H
#define __RTX_RTC_H

#ifdef __cplusplus
extern "C" {
#endif

/* Error values that functions can return */
typedef enum
{
    RTC_OK = 0,    /* No error  */
    RTC_ERROR_LSI, /* LSI  Fail   */
    RTC_ERROR_LSE, /* LSE  Fail    */
} RTC_ERROR;

extern RTC_ERROR RTC_init();
extern RTC_ERROR set_date(U32 year, U32 month, U32 day);
extern RTC_ERROR set_time(U32 hour, U32 minute, U32 second);

#ifdef __cplusplus
}
#endif

#endif /* __RTX_RTC_H */

/*----------------------------------------------------------------------------
 * end of file
 *---------------------------------------------------------------------------*/
